package com.ltsh.fim.server.model.resp;

import com.ltsh.fim.server.model.enums.ResultCodeEnum;

public class ResultResp<T> {
    private String code;
    private String message;
    private T content;
    public ResultResp() {
        this.code = ResultCodeEnum.CHENGGONG.getCode();
        this.message = ResultCodeEnum.CHENGGONG.getMessage();
    }

    public ResultResp(String code, String message) {
        this.code = code;
        this.message = message;
    }
    public ResultResp(String code, String message, T content) {
        this.code = code;
        this.message = message;
        this.content = content;
    }
    public boolean chenggong() {
        if(ResultCodeEnum.CHENGGONG.getCode().equals(this.code)) {
            return true;
        } else {
            return false;
        }
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public T getContent() {
        return content;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public void setContent(T content) {
        this.content = content;
    }
}
